package BackOffice;
import java.awt.Canvas;

import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;

import javax.swing.WindowConstants;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JSeparator;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class Hauptmenue extends javax.swing.JPanel {
	private JButton addAdmin;
	private JButton jVokabeln_bearbeiten;
	private JLabel Unten;
	private JLabel Oben;
	private JSeparator jSeparator1;
	private JButton jKategorie_bearbeiten;
	private JButton jUserEntfernen;

	public static void main(String[] args) {
		JFrame frame = new JFrame();
		frame.getContentPane().add(new Hauptmenue());
		frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		frame.pack();
		frame.setVisible(true);
	}
	
	public Hauptmenue() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			this.setPreferredSize(new java.awt.Dimension(800, 600));
			this.setLayout(null);
			{
				addAdmin = new JButton();
				this.add(addAdmin);
				addAdmin.setText("Admin hinzuf\u00FCgen");
				addAdmin.setBounds(161, 97, 172, 84);
				addAdmin.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent evt) {
						addAdminActionPerformed(evt);
					}
				});
			}
			{
				jUserEntfernen = new JButton();
				this.add(jUserEntfernen);
				jUserEntfernen.setText("User entfernen");
				jUserEntfernen.setBounds(496, 97, 172, 84);
				jUserEntfernen.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent evt) {
						jUserEntfernenActionPerformed(evt);
					}
				});
			}
			{
				jVokabeln_bearbeiten = new JButton();
				this.add(jVokabeln_bearbeiten);
				jVokabeln_bearbeiten.setText("Vokabeln bearbeiten");
				jVokabeln_bearbeiten.setBounds(155, 371, 172, 84);
				jVokabeln_bearbeiten.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent evt) {
						jVokabelnHinzufuegenActionPerformed(evt);
					}
				});
			}
			{
				jKategorie_bearbeiten = new JButton();
				this.add(jKategorie_bearbeiten);
				jKategorie_bearbeiten.setText("Kategorie bearbeiten");
				jKategorie_bearbeiten.setBounds(496, 371, 172, 84);
				jKategorie_bearbeiten.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent evt) {
						jKategorie_hinzufuegenActionPerformed(evt);
					}

					private void jKategorie_hinzufuegenActionPerformed(
							ActionEvent evt) {
						Start.getStart().getContentPane().removeAll();
						Kategorie_Sprache_Bearbeiten KAS = new Kategorie_Sprache_Bearbeiten();
						Start.getStart().add(KAS);
						Start.getStart().validate();
						
					}
				});
			}
			{
				jSeparator1 = new JSeparator();
				this.add(jSeparator1);
				jSeparator1.setBounds(105, 242, 618, 12);
			}
			{
				Oben = new JLabel();
				this.add(Oben);
				Oben.setText("Benutzerebene");
				Oben.setBounds(52, 46, 218, 16);
				Oben.setFont(new java.awt.Font("Lucida Grande",1,16));
			}
			{
				Unten = new JLabel();
				this.add(Unten);
				Unten.setText("Sprachebene");
				Unten.setBounds(52, 312, 218, 16);
				Unten.setFont(new java.awt.Font("Lucida Grande",1,16));
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	protected void jVokabelnHinzufuegenActionPerformed(ActionEvent evt) {
		Start.getStart().getContentPane().removeAll();
		Vokabeln_bearbeiten vok = new Vokabeln_bearbeiten();
		Start.getStart().add(vok);
		Start.getStart().validate();
	}

	protected void jKategorie_entfernenActionPerformed(ActionEvent evt) {
		// TODO Auto-generated method stub
		
	}

	private void addAdminActionPerformed(ActionEvent evt) {
	Start.getStart().getContentPane().removeAll();
	addAdmin add = new addAdmin();
	Start.getStart().add(add);
	Start.getStart().validate();
	
		
	}
	
	private void jUserEntfernenActionPerformed(ActionEvent evt) {
		Start.getStart().getContentPane().removeAll();
		User_entfernen del = new User_entfernen();
		Start.getStart().add(del);
		Start.getStart().validate();
		
	}
	
	
	

}
